//"use strict";

var router = require("router"),
    TokenService = require("router").TokenService,
    mongo = require('./core/mongoservice'),
    ObjectId = require('mongodb').ObjectID,
    Q = require('q');

function AlertCreationService() {
    console.log("AlertCreationService constructor");
}
AlertCreationService.prototype = Object.create(TokenService.prototype);
AlertCreationService.prototype.constructor = AlertCreationService;


AlertCreationService.prototype.empty = function (request, response, promise) {
    return promise.then(function (self) {
        return self.getAlertModel().then(function (alert) {
            return response.send({ request: request, content: alert });
        });
    });
};

/*-------------------------------------------------------*/
/*mongo daf*/
AlertCreationService.prototype.getAlertModel = function () {
    return Q.fcall(function () {
        return {
            type: null,
            dates: {
                creation: null,
                delay: ""
            },
            tags: [],
            articles: [{
                content: "",
                image: {
                    id: null
                }
            }],
            shop: {
                category: null
            }
        };
    });
};

exports = module.exports = new AlertCreationService();